<?php include './application/views/top.php'; ?>
<script src="/static/js/ajaxfileupload.js"></script>
<script src="/static/js/gsdai.js"></script>
<script src="/static/js/My97DatePicker/WdatePicker.js"></script>
<script src="/static/js/formCheck.js"></script>
<div class="clear"></div>
<div class="user_bottom all"></div>
<div class="clear h50"></div>
<div class="layout uc">
	<?php include './application/views/user/left.php'; ?>
	<?php
		$sex = $v['sex'];
		$cardType = $v['cardType'];
	?>
	<div class="right">
		<div class="menu_list"><?php include './application/views/user/menu.php'; ?></div>
        <div class="cont">
        	<form action="" method="post">
			<input type="hidden" name="act" value="submit">
            <dl class="line">
            	<dt>真实姓名：</dt>
                <dd><?php echo strdisplay($user['realname'], 1); ?></dd>
            </dl>
            <dl class="line">
            	<dt>账户总额：</dt>
                <dd><?php echo number_format($account['total'], 2); ?></dd>
            </dl>
            <dl class="line">
            	<dt>可用余额：</dt>
                <dd><?php echo number_format($account['use_money'], 2); ?></dd>
            </dl>
            <dl class="line">
            	<dt>可提现金额：</dt>
                <dd><?php echo number_format($account['use_money'] - $account_tyj, 2); ?></dd>
            </dl>
            <dl class="line">
            	<dt>冻结金额：</dt>
                <dd><?php echo number_format($account['no_use_money'], 2); ?></dd>
            </dl>
            <?php if ($user['real_status'] == 1 && $user['paypassword'] && isset($bank['user_id'])) { ?>
            <dl class="line">
            	<dt>提现银行：</dt>
                <dd>
				<?php echo $bank_list[$bank['bank']]; ?>
				<?php echo $bank['province'] ? $area[$bank['province']] : ''; ?>
				<?php echo $bank['city'] ? $area[$bank['city']] : ''; ?>
				<?php echo $bank['branch']; ?>
                </dd>
            </dl>
            <dl class="line">
            	<dt>提现账户：</dt>
                <dd><?php echo strdisplay($bank['account'], 4); ?></dd>
            </dl>
            <dl class="line">
            	<dt>提现金额：</dt>
                <dd><input class="input" type="text" id="ckmoney" name="money"  value="" size="20" maxlength="10" onkeyup="shouxufei(this.value)" onchange="shouxufei(this.value)" onblur="shouxufei(this.value)"/> 单笔提现金额100—1000000元（手续费：<span id="sxf" style="color:red">0</span>元）</dd>
            </dl>
                        <script>
                            var use_money = <?php echo $account['use_money']; ?>;
                            function shouxufei(money) {
                                var sx_money = 0;
                                if (money) {
                                    sx_money = Math.round((money) * <?php echo CASH_FEE;?> * 100) / 100;
                                }
                                document.getElementById("sxf").innerHTML = sx_money;
                                var len = money.length;
                                if (money == '') {
                                    document.getElementById("ckmoney").value = '';
                                } else if (money.substring(len - 1, len) == '.') {
                                    document.getElementById("ckmoney").value = parseInt(money * 100) / 100 + '.';
                                } else {
                                    var i = money.indexOf('.');
                                    if (i > 0) {
                                        document.getElementById("ckmoney").value = money.substring(0, i + 3)
                                    }
                                }

                            }
                        </script>
            <dl class="line">
            	<dt>交易密码：</dt>
                <dd><input class="input" type="password" name="paypwd"  value="" size="20" maxlength="20" /></dd>
            </dl>
            <dl class="line">
            	<dt>验证码：</dt>
                <dd><input class="fl" type="text" id="captcha" name="captcha" style="width:45px;" maxlength="4">
                <div class="code"><img src="/yanzheng/index/" id="imgCode" onclick="changeImage();" style="border:0;padding:0px;cursor:pointer;"/></div></dd>
            </dl>
            <dl class="line">
            	<dt>交易密码：</dt>
                <dd><input class="input" type="password" name="paypwd"  value="" size="20" maxlength="20" /></dd>
            </dl>
            <div class="cb"><input class="button" type="submit" value="确认提交" /></div>
            <?php } else { ?>
            <div class="tishi" style="border:0px; padding-left:0px;">
				<?php if ($user['real_status'] != 1) { ?>
				<a href="/user/realname/index.html" style="color: red;">请先完成实名认证!</a>
				<?php } elseif (!$user['paypassword']) { ?>
				<a href="/user/paypwd/index.html" style="color: red;">请先设置交易密码!</a>
				<?php } elseif (!isset($bank['user_id'])) { ?>
				<a href="/account/bank/index.html" style="color: red;">请先填写银行账号!</a>
				<?php } ?>
            </div>
            <?php } ?>
            </form>
        </div>
	</div>
</div>
<div class="clear h50"></div>
<?php include "./application/views/footer.php";?>